
import matplotlib.pyplot as plt
from PIL import Image
import numpy as np
# 读取图像-转化为灰度图片-转化为numpy数组
myim = Image.open("./images/pic1.jpg")
myimgray = np.array(myim.convert("L"),dtype=np.float32)